<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>知识库展示模块</title>
    <!--<base href="http://localhost:63342/NodeTest/"/>-->
    <link rel="stylesheet" href="../css/main.min.css">
    <!--<script src="https://d3js.org/d3.v5.min.js"></script>-->
    <link rel="stylesheet" href="../css/neo4jd3.min.css">
    <script src="config.js"></script>
    <script src="../js/main.min.js"></script>
    <script src="../base/core.js"></script>
    <script src="faultView2.js"></script>
    <script src="tree-view.js"></script>
    <script src="../js/d3.min.js"></script>
    <script src="../js/neo4jd3.js"></script>
    <link rel="stylesheet" href="treeview.css">
    <style>
        #faultTreeDiv div{
            border:2px solid black;
        }

        #nodeDetail2{
            font-size: x-large;
        }
        div.neo4jd3 svg{
            min-height: 500px;
        }
    </style>
    <style media="print">
        .no-print { display: none }
        .page-next{ page-break-after: always }
    </style>
</head>
<body ng-app="myApp" ng-controller="manageController2">
<!--知识库查询-->
<div class="container-fluid">
    <div class="row">
        <form class="form-inline">
            <div class="form-group">
                <div class="form-group">
                    <label>故障大类</label>
                    <select class="form-control" data-ng-model="query.faultSuperType" data-ng-options="x.id as x.label for x in [{id:1,label:'火电'},{id:2,label:'水电'}]"></select>
                </div>
                <div class="form-group">
                    <label>故障分组</label>
                    <!--<select class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['发电机','水电','锅炉','汽轮机','测试']">-->
                    <select ng-if="query.faultSuperType==1" class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['汽轮发电机','汽轮机','锅炉','测试']"></select>
                    <select ng-if="query.faultSuperType==2" class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['水轮发电机','水轮机','辅机','测试']"></select>
                    <select ng-if="query.faultSuperType!=1 && query.faultSuperType!=2" class="form-control" data-ng-model="query.faultType" data-ng-options="x for x in ['汽轮发电机','水轮发电机','汽轮机','锅炉','水轮机','辅机','测试']"></select>
                </div>
                <div class="form-group">
                    <label>故障模块</label>
                    <select class="form-control" data-ng-model="query.faultModule" data-ng-options="x.name as x.name for x in faultModules | filter:{'category':query.faultType} "></select>
                </div>
                <div class="form-group">
                    <label>故障名称</label>
                    <select class="form-control" data-ng-model="query.fault" data-ng-options="('<'+fault.outId+'>'+ fault.name) for fault in faults | filter:filterOfFault | orderBy:sortByOutId"></select>
                </div>
                <p class="form-control-static">
                    <a href="javascript:;" ng-click="displayAllTree()">展示所有故障树</a>
                    故障显示模式：<span><input type="radio" name="mode" ng-checked="true" ng-model="graphModel" value="1">替换</span>
                    <span><input type="radio" name="mode" ng-model="graphModel" value="2">加入</span>
                    <a href-lang="image/svg+xml" href="javascript:;" ng-click="generateDownloadHref()">生成下载链接</a>
                    <a ng-if="href.length>0" download="故障展示.svg" ng-href="{{href}}">在标签上右键另存为下载svg</a>
                    <button class="btn btn-info" ng-click="reloadData()">刷新数据</button>
                </p>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-md-4">
            <div class="panel" style="height: 800px">
                <div class="panel-heading">故障树&nbsp;<a href="javascript:;" ng-click="graphTree.collapseAll()">展开所有节点</a> </div>
                <div class="panel-body treeDiv">
                    <tree-view tree-service="graphTree" node-label="text"></tree-view>
                </div>
            </div>
        </div>
        <div class="col-md-8">
            <div class="panel" style="height: 800px">
                <div class="panel-heading">节点详情</div>
                <div class="panel-body">
                    <form class="form-horizontal nodeDetail" id="nodeDetail2">

                    </form>
                    <!--<iframe width="100%" height="100%" style="min-height: 600px" scrolling="auto" ng-src="{{faultUrl}}">-->

                    <!--</iframe>-->
                    <div id="neo4jd3"></div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>